﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class ReciveMessageBLL : BaseBLL<ReciveMessage>
    {
        public ReciveMessage entity = new ReciveMessage();
        ReciveMessageDAO dao = new ReciveMessageDAO();
        public override ReciveMessage GetModel()
        {
            return entity;
        }
        public IList<ReciveMessage> GetListPaging(int page, int pagesize, int userid, bool isDel, DateTime date1, DateTime date2, string key)
        {
            return dao.GetListPaging(page, pagesize, userid, isDel, date1, date2, key);
        }

        public int GetListPaging(int userid, bool isDel, DateTime date1, DateTime date2, string key)
        {
            return dao.GetListPaging(userid, isDel, date1, date2, key);
        }



         /// <summary>
        /// 根据发布信息用户和状态查询信件
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<ReciveMessage> GetListPaging(int page, int pagesize, int userid, int state, bool isread)
        {
            return dao.GetListPaging(page,pagesize,userid,state,isread);
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信件条目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, int state, bool isread)
        {
            return dao.GetListPaging(userid, state, isread);
        }

        public IList<ReciveMessage> GetListPaging(int page, int pagesize, int userid, int state)
        {
            return dao.GetListPaging(page, pagesize, userid, state);
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信件条目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
         public int GetListPaging(int userid, int state)
         {
             return dao.GetListPaging(userid, state);
         }


        /// <summary>
        /// 查询删除信件信息
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<ReciveMessage> GetListPaging(int userid, bool isDel, int page, int pagesize)
        {
            return dao.GetListPaging(userid,isDel,page,pagesize);
        }

        /// <summary>
        /// 查询删除信件数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, bool isDel)
        {
            return dao.GetListPaging(userid, isDel);
        }


          /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRecieveMessageUpdate(string ids)
        {
            return dao.BatchRecieveMessageUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRRecieveMessageUpdate(string ids)
        {
            return dao.BatchRRecieveMessageUpdate(ids);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRRecieveMessageDelete(string ids)
        {
            return dao.BatchRRecieveMessageDelete(ids);
        }
    }
}
